from selenium.webdriver.common.by import By

from base import Base
class Page(Base):
    def sou(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜索菜谱")')
        ele=self.find_ele(loc)
        return ele
    def shu(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele
    def dian(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="搜索"]')
        ele=self.find_ele(loc)
        return ele
    def tu(self):
        loc=(By.XPATH,'(//android.widget.ImageView[@resource-id="com.xiachufang:id/common_photo_image_view"])[1]')
        ele=self.find_ele(loc)
        return ele
    def ping(self):
        loc=(By.ID,'com.xiachufang:id/recipe_bto_nav_bar_comment')
        ele=self.find_ele(loc)
        return ele
    def shupl(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.xiachufang:id/tv_recipe_review"]')
        ele=self.find_ele(loc)
        return ele
    def srpl(self):
        loc=(By.XPATH,'//android.widget.EditText[@resource-id="com.xiachufang:id/eidt_comment_content"]')
        ele=self.find_ele(loc)
        return ele
    def fs(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.xiachufang:id/tv_comment_publish_btn"]')
        ele=self.find_ele(loc)
        return ele
    def fan(self):
        loc=(By.XPATH,'//android.widget.ImageView[@content-desc="返回"]')
        ele=self.find_ele(loc)
        return ele
    def yan(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="综合"]')
        ele=self.find_ele(loc)
        return ele